/*
 * @Descripttion: This *.h file includes some common function:
 *                  dalay us, delay ms, get system clock and
 *                 print function. 
 * @version: 
 * @Author: Miller Zhou
 * @Date: 2021-02-18 13:51:27
 * @LastEditors: Miller Zhou
 * @LastEditTime: 2021-02-19 18:29:30
 */
#ifndef __ZcommonDrv_H__
#define __ZcommonDrv_H__

#include "nativeInterface.h"
#include <stdint.h>
#include <stdio.h>

/*select mcu - stm32f1*/
#ifdef mcu_stm32f1_hal
#include "stm32f1xx_hal.h"
// #include "cmsis_os.h"
#endif

/*select mcu - stm32f4*/
#ifdef mcu_stm32f4_hal
#include "stm32f4xx_hal.h"
// #include "cmsis_os.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif

/****************************************************************
 *                     Function declaration
*****************************************************************/
void Z_delay_ms(uint32_t ms);
void Z_delay_us(uint32_t us);
void Z_delay_s(uint32_t s);
void Z_printf(const char* format);
uint32_t Z_getms(void);

#ifdef __cplusplus
}
#endif

#endif
